package com.eazy.lkv2.web.vo;

import com.eazy.lkv2.web.entity.Activitys;
import com.rework.joss.persistence.convention.annotation.GeneratedValue;
import com.rework.joss.persistence.convention.annotation.Id;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by hpb on 2018/5/5.
 */
public class ActivityVO {
    private Integer id;
    private Integer hotelId;
    private Integer hallId;
    private String title;
    private int status; //0禁用 1启用
    private String content;
    private String beginTime;
    private String endTime;
    private String hotelName;
    private String hallName;
    private String poster;

    private String activitysImg;

    public String getActivitysImg() {
        return activitysImg;
    }

    public void setActivitysImg(String activityImg) {
        this.activitysImg = activityImg;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getHotelId() {
        return hotelId;
    }

    public void setHotelId(Integer hotelId) {
        this.hotelId = hotelId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getHotelName() {
        return hotelName;
    }

    public void setHotelName(String hotelName) {
        this.hotelName = hotelName;
    }

    public String getHallName() {
        return hallName;
    }

    public void setHallName(String hallName) {
        this.hallName = hallName;
    }

    public String getPoster() {
        return poster;
    }

    public void setPoster(String poster) {
        this.poster = poster;
    }

    public Integer getHallId() {
        return hallId;
    }

    public void setHallId(Integer hallId) {
        this.hallId = hallId;
    }

    public static ActivityVO  get(Activitys activitys){
        ActivityVO activityVO=new ActivityVO();
        activityVO.setId(activitys.getId());
        activityVO.setActivitysImg(activitys.getActivitysImg());
        activityVO.setContent(activitys.getContent());
        activityVO.setHotelId(activitys.getHotelId());
        activityVO.setTitle(activitys.getTitle());
        activityVO.setStatus(activitys.isStatus()?1:0);
        SimpleDateFormat dateFormat=new SimpleDateFormat("YYYY-MM-dd HH:mm");
        activityVO.setBeginTime(dateFormat.format(activitys.getBeginTime()));
        activityVO.setEndTime(dateFormat.format(activitys.getEndTime()));

        activityVO.setHallName(activitys.getHallName());
        activityVO.setHotelName(activitys.getHotelName());
        activityVO.setHotelId(activitys.getHotelId());
        activityVO.setPoster(activitys.getPoster());
        activityVO.setHallId(activitys.getHallId());
        return  activityVO;
    }
}
